-- GENERATED SPELL FOR [Darkcrest Siren] --


function spell0_18087(pUnit, Event) --@Frost Nova,Self--
pUnit:FullCastSpellOnTarget(11831,pUnit)
pUnit:RegisterEvent('Sorts_18087', 8304, 1)
end

function spell1_18087(pUnit, Event) --@Frostbolt,n/a--
pUnit:FullCastSpellOnTarget(9672,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_18087', 7000, 1)
end

function spell2_18087(pUnit, Event) --@Silence,n/a--
pUnit:FullCastSpellOnTarget(6726,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_18087', 5310, 1)
end

function Sorts_18087(pUnit, Event)
local choix_sorts_18087 = math.random(0, 2)
if choix_sorts_18087 == 0 then
pUnit:RegisterEvent('spell0_18087', 1, 1)
end
if choix_sorts_18087 == 1 then
pUnit:RegisterEvent('spell1_18087', 1, 1)
end
if choix_sorts_18087 == 2 then
pUnit:RegisterEvent('spell2_18087', 1, 1)
end
end

function mob18087_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_18087', math.random(1500, 3000), 1)
end

function mob18087_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob18087_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob18087_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(18087, 1, 'mob18087_Action')
RegisterUnitEvent(18087, 2, 'mob18087_Leave')
RegisterUnitEvent(18087, 3, 'mob18087_Kill')
RegisterUnitEvent(18087, 4, 'mob18087_Die')
